1. Field of the Invention
The present invention relates to a method of controlling a nonvolatile semiconductor memory, particularly to a method of controlling a nonvolatile semiconductor memory having a predetermined size of a block to be erased.
2. Description of the Related Art
There has been used a memory card using a flash memory (nonvolatile semiconductor memory) as a recording medium of music data or video data. A FAT file system, which allocates data to recordable areas regardless of the address of the recordable areas, is used as a file system of the memory card. Jpn. Pat. Appln. KOKAI Publication No. 7-141479 discloses that FAT file system is adopted in the file system for the flash memory.
NAND Flash™ memory may be typically used as a example of the flash memory for use in the memory card. In the NAND Flash™ memory, data can be erased only in block unit basis. Thus, to rewrite only a part of the data stored in a block, it is necessary to write a new write data to a new erased block and to copy data, which are not to be rewritten, from the old block containing the old data (that are to be changed to new data) to the new block. This process is called “move accompanying write (involved data copy)”. The move accompanying write involves an operation of copying data that is not to be rewritten. Consequently, frequent move accompanying write operations drastically increase overhead.
In the FAT file system, the rewriting of FAT data occurs every time cluster data of a file is rewritten. Therefore, when the FAT file system is adopted for the file managing the NAND Flash™ memory, every time the cluster data is rewritten, the moving write occurs, and a file rewriting speed drops.